home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-17 | 5.5 KB | 179 lines | [TEXT/PJMM] |
- UNIT FSpCompat;
-
-
-
- { Apple Macintosh Developer Technical Support }
- { }
- { FSSpec compatibility functions }
- { }
- { by Jim Luther, Apple Developer Technical Support }
- { }
- { File: FSpCompat.p }
- { }
- { Copyright © 1992-1994 Apple Computer, Inc. }
- { All rights reserved. }
- { }
- { You may incorporate this sample code into your applications without }
- { restriction, though the sample code has been provided "AS IS" and the }
- { responsibility for its operation is 100% yours. However, what you are }
- { not permitted to do is to redistribute the source as "DSC Sample Code" }
- { after having made changes. If you're going to re-distribute the source, }
- { we require that you make it clear in the source that the code was }
- { descended from Apple Sample Code, but that you've made changes. }
-
-
- INTERFACE
-
-
- {***************************************************************************}
-
-
- FUNCTION FSMakeFSSpecCompat (vRefNum: INTEGER;
- dirID: LONGINT;
- fileName: Str255;
- VAR spec: FSSpec): OSErr;
- { Differences from FSMakeFSSpec: }
- { If the file system can't create the FSSpec, then the compatibility code }
- { creates a FSSpec that is exactly like an FSSpec except that spec.name }
- { for a file may not have the same capitalization as the file's catalog }
- { entry on the disk volume. That is because fileName is parsed to get the }
- { name instead of getting the name back from the file system. This works }
- { fine with System 6 where FSMakeSpec isn't available. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpOpenDFCompat (spec: FSSpec;
- permission: SignedByte;
- VAR refNum: INTEGER): OSErr;
- { Differences from FSpOpenDF: }
- { If FSpOpenDF isn't available, FSpOpenDFCompat uses PHBOpen because }
- { System 6 doesn't support PBHOpenDF. This means FSpOpenDFCompat could }
- { accidentally open a driver if the spec->name begins with a period. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpOpenRF (spec: FSSpec;
- permission: SignedByte;
- VAR refNum: INTEGER): OSErr;
- { No known differences from FSpOpenRF. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpCreate (spec: FSSpec;
- creator: OSType;
- fileType: OSType;
- scriptTag: ScriptCode): OSErr;
- { Differences from FSpCreate: }
- { FSpCreateCompat correctly sets the fdScript in the file's FXInfo record }
- { to scriptTag. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpDirCreate (spec: FSSpec;
- scriptTag: ScriptCode;
- VAR createdDirID: LONGINT): OSErr;
- { No known differences from FSpDirCreate. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpDelete (spec: FSSpec): OSErr;
- { No known differences from FSpDelete. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpGetFInfo (spec: FSSpec;
- VAR fndrInfo: FInfo): OSErr;
- { No known differences from FSpGetFInfo. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpSetFInfo (spec: FSSpec;
- fndrInfo: FInfo): OSErr;
- { No known differences from FSpSetFInfo. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpSetFLock (spec: FSSpec): OSErr;
- { No known differences from FSpSetFLock. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpRstFLock (spec: FSSpec): OSErr;
- { No known differences from FSpRstFLock. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpRename (spec: FSSpec;
- newName: Str255): OSErr;
- { No known differences from FSpRename. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpCatMove (source: FSSpec;
- dest: FSSpec): OSErr;
- { No known differences from FSpCatMove. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpExchangeFiles (source: FSSpec;
- dest: FSSpec): OSErr;
- { Differences from FSpExchangeFiles: }
- { Correctly exchanges files on volumes that don't support PBExchangeFiles.}
- { FSpExchangeFiles attempts to support volumes that don't support }
- { PBExchangeFiles, but in System 7, 7.0.1, 7.1, and 7 Pro, the }
- { compatibility code just doesn't work on volumes that don't support }
- { PBExchangeFiles (even though you may get a noErr result). }
- { Future versions of system softare will have the problems in }
- { FSpExchangeFiles corrected. }
-
-
- {***************************************************************************}
-
-
- FUNCTION FSpOpenResFile (spec: FSSpec;
- permission: SignedByte): INTEGER;
- { No known differences from FSpOpenResFile. }
-
-
- {***************************************************************************}
-
-
- PROCEDURE FSpCreateResFile (spec: FSSpec;
- creator: OSType;
- fileType: OSType;
- scriptTag: ScriptCode);
- { Differences from FSpCreateResFile: }
- { FSpCreateResFileCompat correctly sets the fdScript in the file's }
- { FXInfo record to scriptTag. }
-
-
- {***************************************************************************}
-
-
- IMPLEMENTATION
-
- END.